package com.atguigu.yygh.hosp.api;

import com.atguigu.yygh.common.R;
import com.atguigu.yygh.hosp.service.HospitalSetService;
import com.atguigu.yygh.model.hosp.HospitalSet;
import com.atguigu.yygh.vo.hosp.HospitalQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;

/**
 * 医院平台用户系统（前端）  连接mysql
 */
@Api(tags = "【首页】医院显示接口")
@RestController
@RequestMapping("/api/hosp/hospitalSet")
public class HospitalSetApiController {

    @Autowired
    private HospitalSetService hospitalSetService;


    //根据hoscode查询医院设置
    @ApiOperation(value = "根据hoscode查询医院设置")
    @GetMapping("getById/{hoscode}")
    public R getByhoscode(@PathVariable String hoscode){
        HospitalSet hospitalSet = hospitalSetService.getByHoscode(hoscode);
        return R.ok().data("hospitalSet",hospitalSet);
    }

}
